package leetcode;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by 林剑 on 2016/10/18.
 */
public class Regex {
    public static void main(String[] args) {
        Pattern pattern = Pattern.compile("^[0,1]+$");//判斷是不是二进制数
        Matcher matcher = pattern.matcher("0101");
        System.out.println(matcher.matches());
    }
}
